package ZMJ;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class tianjia2 extends JFrame implements ActionListener {
	JLabel jl1;
	JButton jb1;
	JButton jb2;
	JPanel jp1 = new JPanel();

	public tianjia2() {
		super("添加成功");
		jl1 = new JLabel("                       添加成功");
		jb1 = new JButton("继续添加");
		jb2 = new JButton("返        回");
		jb1.addActionListener(this);
		jb2.addActionListener(this);
		jp1 = new JPanel();
		jp1.add(jb1);
		jp1.add(jb2);
		this.add(jl1, BorderLayout.CENTER);
		this.add(jp1, BorderLayout.SOUTH);
		this.setSize(200, 200);
		this.setVisible(true);
		this.setLocationRelativeTo(null);
		// this.setDefaultCloseOperation(EXIT_ON_CLOSE);
	}

	// public static void main(String[] args) {
	// new tianjia2();
	// }

	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == jb1) {
			dispose();
			new tianjia();
		}
		if (e.getSource() == jb2) {
			dispose();
			new danci();
		}
	}
}
